#ifndef OPHIES_SEARCH_H
#define OPHIES_SEARCH_H

#include <QHash>
#include <QString>
#include <QStringList>
#include <QUrl>

namespace ophies
{

	
class Search
{

public:
	Search();
	virtual ~Search();

protected:
	QHash<QString, QString> *m_attrs;

protected:
	void insert(QString column, QString value);
	void remove(QString column);

public:
	void setQueryTo(QUrl &url);
	QString toQueryString();
	int getItemCount();
};


class SearchDcmStudies : public Search
{
public:
	SearchDcmStudies();
	virtual ~SearchDcmStudies();

public:
	void set_dcm_study_key(QString value);
	void remove_dcm_study_key();

	void set_vgroup_key(QString value);
	void remove_vgroup_key();

	void set_study_instance_uid(QString value);
	void remove_study_instance_uid();

	void set_patient_key(QString value);
	void remove_patient_key();

	void set_patient_id(QString value);
	void remove_patient_id();

	void set_patient_name(QString value);
	void remove_patient_name();

	void set_patient_sex(QString value);
	void remove_patient_sex();

	void set_patient_birth_dttm(QString value);
	void remove_patient_birth_dttm();

	void set_patient_age(QString value);
	void remove_patient_age();

	void set_patient_weight(QString value);
	void remove_patient_weight();

	void set_patient_size(QString value);
	void remove_patient_size();

	void set_study_id(QString value);
	void remove_study_id();

	void set_study_dttm(QString value);
	void remove_study_dttm();

	void set_accession_no(QString value);
	void remove_accession_no();

	void set_study_desc(QString value);
	void remove_study_desc();

	void set_study_size(QString value);
	void remove_study_size();

	void set_series_count(QString value);
	void remove_series_count();

	void set_instance_count(QString value);
	void remove_instance_count();

	void set_created_dttm(QString value);
	void remove_created_dttm();

	void set_updated_dttm(QString value);
	void remove_updated_dttm();

	void set_deleted_dttm(QString value);
	void remove_deleted_dttm();

	void set_url(QString value);
	void remove_url();

};

class SearchDcmSeries : public Search
{
public:
	SearchDcmSeries();
	virtual ~SearchDcmSeries();

public:
	void set_dcm_series_key(QString value);
	void remove_dcm_series_key();

	void set_vgroup_key(QString value);
	void remove_vgroup_key();

	void set_series_instance_uid(QString value);
	void remove_series_instance_uid();

	void set_dcm_study_key(QString value);
	void remove_dcm_study_key();

	void set_modality(QString value);
	void remove_modality();

	void set_series_no(QString value);
	void remove_series_no();

	void set_series_dttm(QString value);
	void remove_series_dttm();

	void set_series_desc(QString value);
	void remove_series_desc();

	void set_bodypart(QString value);
	void remove_bodypart();

	void set_series_size(QString value);
	void remove_series_size();

	void set_instance_count(QString value);
	void remove_instance_count();

	void set_created_dttm(QString value);
	void remove_created_dttm();

	void set_deleted_dttm(QString value);
	void remove_deleted_dttm();

	void set_url(QString value);
	void remove_url();

};

class SearchDcmInstances : public Search
{
public:
	SearchDcmInstances();
	virtual ~SearchDcmInstances();

public:
	void set_dcm_instance_key(QString value);
	void remove_dcm_instance_key();

	void set_vgroup_key(QString value);
	void remove_vgroup_key();

	void set_sop_instance_uid(QString value);
	void remove_sop_instance_uid();

	void set_sop_class_uid(QString value);
	void remove_sop_class_uid();

	void set_dcm_series_key(QString value);
	void remove_dcm_series_key();

	void set_dcm_study_key(QString value);
	void remove_dcm_study_key();

	void set_instance_no(QString value);
	void remove_instance_no();

	void set_content_dttm(QString value);
	void remove_content_dttm();

	void set_instance_size(QString value);
	void remove_instance_size();

	void set_created_dttm(QString value);
	void remove_created_dttm();

	void set_deleted_dttm(QString value);
	void remove_deleted_dttm();

	void set_url(QString value);
	void remove_url();

};

class SearchDocsets : public Search
{
public:
	SearchDocsets();
	virtual ~SearchDocsets();

public:

	void set_docset_key(QString value);
	void remove_docset_key();

	void set_vgroup_key(QString value);
	void remove_vgroup_key();

	void set_vgroup_id(QString value);
	void remove_vgroup_id();

	void set_vgroup_id_type(QString value);
	void remove_vgroup_id_type();

	void set_vgroup_name(QString value);
	void remove_vgroup_name();

	void set_docset_uid(QString value);
	void remove_docset_uid();

	void set_docset_class_uid(QString value);
	void remove_docset_class_uid();

	void set_docset_group_uid(QString value);
	void remove_docset_group_uid();

	void set_filter_key(QString value);
	void remove_filter_key();

	void set_filter_uid(QString value);
	void remove_filter_uid();

	void set_filter_class_uid(QString value);
	void remove_filter_class_uid();

	void set_filter_name(QString value);
	void remove_filter_name();

	void set_patient_key(QString value);
	void remove_patient_key();

	void set_patient_id_value(QString value);
	void remove_patient_id_value();

	void set_patient_name(QString value);
	void remove_patient_name();

	void set_docset_created_dttm(QString value);
	void remove_docset_created_dttm();

	void set_docset_deleted_dttm(QString value);
	void remove_docset_deleted_dttm();

	void set_xds_docset_key(QString value);
	void remove_xds_docset_key();

	void set_metadata_xml(QString value);
	void remove_metadata_xml();

	void set_docset_uuid(QString value);
	void remove_docset_uuid();

	void set_source_id(QString value);
	void remove_source_id();

	void set_content_type_code_value(QString value);
	void remove_content_type_code_value();

	void set_content_type_coding_scheme(QString value);
	void remove_content_type_coding_scheme();

	void set_content_type_code_meaning(QString value);
	void remove_content_type_code_meaning();

	void set_docset_status(QString value);
	void remove_docset_status();

	void set_docset_title(QString value);
	void remove_docset_title();

	void set_docset_comments(QString value);
	void remove_docset_comments();

	void set_submit_dttm(QString value);
	void remove_submit_dttm();

	void set_xds_docset_created_dttm(QString value);
	void remove_xds_docset_created_dttm();

	void set_xds_docset_deleted_dttm(QString value);
	void remove_xds_docset_deleted_dttm();

	void set_document_count(QString value);
	void remove_document_count();

	void set_url(QString value);
	void remove_url();
};

class SearchPatients : public Search
{
public:
	SearchPatients();
	virtual ~SearchPatients();

public:
	void set_patient_key(QString value);
	void remove_patient_key();

	void set_patient_id_value(QString value);
	void remove_patient_id_value();

	void set_patient_name(QString value);
	void remove_patient_name();

	void set_patient_sex(QString value);
	void remove_patient_sex();

	void set_patient_birth_dttm(QString value);
	void remove_patient_birth_dttm();

	void set_related_patient_key(QString value);
	void remove_related_patient_key();

	void set_created_dttm(QString value);
	void remove_created_dttm();

	void set_deleted_dttm(QString value);
	void remove_deleted_dttm();

	void set_url(QString value);
	void remove_url();

};

} // end of namespace



#endif